package com.boss.salary.test;

import com.alibaba.fastjson.JSONObject;
import com.boss.common.util.JSONUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils;

import java.net.URLDecoder;
import java.nio.file.Files;
import java.nio.file.Paths;

public class test {
    private static final Logger logger = LoggerFactory.getLogger(test.class);
    public static void main(String[] args) {
        try {
            byte[] content = Files.readAllBytes(Paths.get("C:\\Users\\Administrator\\Desktop\\祥云\\new.txt"));
            String data = new String(content);
            String data1 = URLDecoder.decode(data, "UTF-8");
            String[] datas = data1.split("\n");
            for(String da:datas) {
                if (JSONUtils.isValidJson(da)) {
                    logger.info(da);
                    JSONObject param5map = JSONObject.parseObject(da);
                    if (!CollectionUtils.isEmpty(param5map)) {

                    }
                }
            }
        }catch (Exception e) {
            logger.info(e.getMessage());
        }
    }
}
